using System;

namespace FrameworkX.ObjectSpace.Data.Schema
{
	/// <summary>
	/// Defines a parent object type. Usefull for getting 
	/// object relational info. System not fully mature, so
	/// ignore for now.
	/// </summary>
	[AttributeUsage(AttributeTargets.Property)]
	public class ParentEntityAttribute : System.Attribute 
	{
		private Type _parentObject;
		private string _foreignKeyPropertyName;

		public ParentEntityAttribute( Type parentObject , string foreignKeyPropertyName)
		{
			_parentObject = parentObject;
			_foreignKeyPropertyName= foreignKeyPropertyName;
		}

		public Type ParentObject
		{
			get{return _parentObject;}
		}
		
		public string ForeignKeyPropertyName
		{
			get {return _foreignKeyPropertyName;}
		}
	}

}
